package com.sc.nft.dao;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sc.nft.entity.PushCidRelationTag;
import com.sc.nft.mapper.PushCidRelationTagMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Repository;

/**
 * @author 刘国航
 * @desc
 * @since 2024/6/21 14:17
 */
@Slf4j
@Repository
public class PushCidRelationTagDao extends ServiceImpl<PushCidRelationTagMapper, PushCidRelationTag> {

    public PushCidRelationTag getByCid(String cid) {
        LambdaQueryWrapper<PushCidRelationTag> queryWrapper = Wrappers.lambdaQuery();
        queryWrapper.eq(PushCidRelationTag::getCid, cid);
        return baseMapper.selectOne(queryWrapper);
    }

}
